import grpc
import Center_ShortLink_pb2, Center_ShortLink_pb2_grpc


class Test_1(object):
    def __init__(self):
        self.host = '121.40.175.176'
        self.port = '10034'

    def test(self):
        conn = grpc.insecure_channel(self.host + ':' + self.port)  # 监听频道
        client = Center_ShortLink_pb2_grpc.CenterShortlinkStub(channel=conn)
        response = client.GetTagDetail(Center_ShortLink_pb2.GetTagDetailRequest(
            id=1,
            uid="265802169",
            userGroup=['sl-admin']
        ))
        print(response)


if __name__ == '__main__':
    test = Test_1()
    test.test()
